<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>交叉轴的对齐方式</title>
    <style>
        .item {
            width: 100px;
            height: 100px;
            border: 2px solid red;
            font-size: 30px;
        }
        .box {
            background-color: lightblue;
            display: flex;
            height: 300px;
            align-items: flex-start;
            align-items: flex-end;
            align-items: center;
        }
        .box2 {
            background-color: lightpink;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            align-items: flex-end;
            align-items: center;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
    </div>
    <div class="box2">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
    </div>
</body>
</html>